package tmp;

// Generated 04-nov-2009 18:40:40 by Hibernate Tools 3.2.4.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * EntryReg generated by hbm2java
 */
@Entity
@Table(name = "entry_reg", catalog = "fmanzano_gem")
public class EntryReg implements java.io.Serializable {

	private Integer regId;
	private InternalUser internalUser;
	private Date regDate;
	private String regDestinatary;
	private Date regDocumentDate;
	private String regDocRef;
	private String regExpose;
	private int regNum;
	private Set<ExpedientDocument> expedientDocuments = new HashSet<ExpedientDocument>(
			0);

	public EntryReg() {
	}

	public EntryReg(Date regDate, String regDestinatary, Date regDocumentDate,
			int regNum) {
		this.regDate = regDate;
		this.regDestinatary = regDestinatary;
		this.regDocumentDate = regDocumentDate;
		this.regNum = regNum;
	}

	public EntryReg(InternalUser internalUser, Date regDate,
			String regDestinatary, Date regDocumentDate, String regDocRef,
			String regExpose, int regNum,
			Set<ExpedientDocument> expedientDocuments) {
		this.internalUser = internalUser;
		this.regDate = regDate;
		this.regDestinatary = regDestinatary;
		this.regDocumentDate = regDocumentDate;
		this.regDocRef = regDocRef;
		this.regExpose = regExpose;
		this.regNum = regNum;
		this.expedientDocuments = expedientDocuments;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "REG_ID", unique = true, nullable = false)
	public Integer getRegId() {
		return this.regId;
	}

	public void setRegId(Integer regId) {
		this.regId = regId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USU_LOGIN")
	public InternalUser getInternalUser() {
		return this.internalUser;
	}

	public void setInternalUser(InternalUser internalUser) {
		this.internalUser = internalUser;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "REG_DATE", nullable = false, length = 19)
	public Date getRegDate() {
		return this.regDate;
	}

	public void setRegDate(Date regDate) {
		this.regDate = regDate;
	}

	@Column(name = "REG_DESTINATARY", nullable = false, length = 250)
	public String getRegDestinatary() {
		return this.regDestinatary;
	}

	public void setRegDestinatary(String regDestinatary) {
		this.regDestinatary = regDestinatary;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "REG_DOCUMENT_DATE", nullable = false, length = 10)
	public Date getRegDocumentDate() {
		return this.regDocumentDate;
	}

	public void setRegDocumentDate(Date regDocumentDate) {
		this.regDocumentDate = regDocumentDate;
	}

	@Column(name = "REG_DOC_REF", length = 250)
	public String getRegDocRef() {
		return this.regDocRef;
	}

	public void setRegDocRef(String regDocRef) {
		this.regDocRef = regDocRef;
	}

	@Column(name = "REG_EXPOSE")
	public String getRegExpose() {
		return this.regExpose;
	}

	public void setRegExpose(String regExpose) {
		this.regExpose = regExpose;
	}

	@Column(name = "REG_NUM", nullable = false)
	public int getRegNum() {
		return this.regNum;
	}

	public void setRegNum(int regNum) {
		this.regNum = regNum;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "entryReg")
	public Set<ExpedientDocument> getExpedientDocuments() {
		return this.expedientDocuments;
	}

	public void setExpedientDocuments(Set<ExpedientDocument> expedientDocuments) {
		this.expedientDocuments = expedientDocuments;
	}

}
